﻿namespace DelegationAndEvents
{
    class CardFactory
    { 
        private CreditCard baseCreditCard = null;
        public CreditCard CreateCard(string bank)
        {
            switch (bank)
            {
                case "CMB":
                    baseCreditCard = new CMBCreditCard("招商银行");
                    break;
                case "ICBC":
                    baseCreditCard = new ICBCCreditCard("中国银行");
                    break;
                default:
                    break;
            }
            return baseCreditCard;
        }
    }
}
